<template>
	<view>
		<zy-empty v-if="formList.length==0"></zy-empty>
			<view v-for="(item, index) in formList" :key="item.id" v-else>
				<zy-group :title="$t('public.callTime')+$t('public.colon') + item.createTime" :btnList="btnList" @btnHandle="btnHandle(item, index)"
					model="card">
					<view class="content">
						<text class="title">{{$t('homepage.CallDeal.department')}}{{$t('public.colon')}}</text>
						<view class="text">{{item.department}}</view>
					</view>
					<view class="content">
						<text class="title">{{$t('homepage.CallDeal.group')}}{{$t('public.colon')}}</text>
						<view class="text">{{item.title}}</view>
					</view>
					<view class="content">
						<text class="title">{{$t('homepage.CallDeal.callType')}}{{$t('public.colon')}}</text>
						<view class="text">{{item.reasonType}}</view>
					</view>
					<view class="content">
						<text class="title">{{$t('homepage.CallDeal.callPeople')}}{{$t('public.colon')}}</text>
						<view class="text">{{item.billUserName}}</view>
					</view>
					<view class="content">
						<text class="title">{{$t('homepage.CallDeal.callReason')}}{{$t('public.colon')}}</text>
						<view class="text">{{item.reasonRemarks}}</view>
					</view>
				</zy-group>
			</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				btnList: [{
					text:this.$t('homepage.CallDeal.deal'),
					type:'danger'
				}],
			}
		},
		props: {
			formList: {
				type: Array,
				default: []
			}
		},
		methods: {
			// 表单领取
			btnHandle(item, index) {
				uni.navigateTo({
					url: '../../../pages/HomePage/CallDeal/dealPage?id=' + item.id
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		display: flex;
		align-items: center; //上下对齐
		padding: 20rpx;
		width: calc(100% - 40rpx);
	}

	.title {
		color: #999;
		width: 30%;
	}

	.text {
		text-align: right;
		width: 70%;
	}
</style>